package com.governtalk.backend.repository;

import com.governtalk.backend.entity.Category;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryRepository extends JpaRepository<Category, Long> {
    
    List<Category> findByParentIdIsNullAndIsActiveTrueOrderBySortOrder();
    
    List<Category> findByParentIdAndIsActiveTrueOrderBySortOrder(Long parentId);
}
